// 大事提醒
import { defineComponent, reactive, ref } from "vue";
import { dxget, qurl } from "../../util/index";
export default defineComponent({
  props: {
    code: {
      type: String,
    },
  },
  setup(props) {
    let datas = ref([]);
    const initData = async () => {
      let kjjhe: any = await dxget("dc/dataget", {
        code: props.code,
      });
      datas.value = kjjhe.data;
      console.log(datas.value);
    };

    initData();
    return () => (
      <>
        <n-card title="大事提醒">
          <n-timeline>
            {datas.value.map((a) => {
              let item = a[0];
              return (
                <n-timeline-item
                  type="info"
                  title={item.EVENT_TYPE}
                  content={item.LEVEL1_CONTENT}
                  time={item.NOTICE_DATE}
                />
              );
            })}
          </n-timeline>
        </n-card>
      </>
    );
  },
});
